//
//  SHPayViewModel.m
//  JiFengDaRen
//
//  Created by 陈如意 on 2018/6/25.
//  Copyright © 2018年 陈永发. All rights reserved.
//

#import "SHPayViewModel.h"

@implementation SHPayViewModel


//藤付通支付
/**
 查询报件状态

 @param success <#success description#>
 */
+ (void)TenpaytongGetApplyViewSuccess:(void(^)(int  status))success{

    [PPNetworkHelper GET:Tft_register_query parameters:nil cache:NO encrypt:NO decode:NO responseCache:^(id responseCache) {
    } success:^(id result) {
        if ([result[@"success"] boolValue] == YES) {
            success(1);
        }else{
            success(0);
        }
    } failure:^(NSError *error) {
        
    }];
}


/**
 报件

 @param success <#success description#>
 */
+ (void)TenpaytongGetReplyWith:(NSString *)card_code andWithSuccess:(void(^)(id success))success{
  
    [PPNetworkHelper POST:Tft_register parameters:@{@"card_code":card_code} cache:NO encrypt:YES decode:NO responseCache:^(id responseCache) {
    } success:^(id result) {
        success(result);
    } failure:^(NSError *error) {
        
    }];
}

+ (void)TenpaytongCreate_orderWithDictionary:(NSDictionary *)dic andWithSuccess:(void(^)(id success))success{
    
    
    [PPNetworkHelper POST:Create_order parameters:dic cache:NO encrypt:YES decode:NO responseCache:^(id responseCache) {
        
    } success:^(id result) {
        success(result);
    } failure:^(NSError *error) {
        
    }];
}

+ (void)Huizhifupay_add_orderDictionary:(NSDictionary *)dic andWithSuccess:(void(^)(id success))success Failure:(void(^)(NSError *error))failure{
    
    [PPNetworkHelper POST:Huizhifu_add_order parameters:dic cache:NO encrypt:YES decode:NO responseCache:^(id responseCache) {
        
    } success:^(id result) {
        success(result);
    } failure:^(NSError *error) {
        failure(error);
    }];
}



@end
